﻿using Microsoft.Practices.Prism.ViewModel;
using System;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace CustomModel
{
    public class ShopAuthorityModel:NotificationObject
    {

        private int? _pId;

        /// <summary>
        /// 父节点
        /// </summary>
        public int? Pid
        {
            get { return _pId; }
            set { _pId = value; this.RaisePropertyChanged(() => this.Pid); }
        }


        private int? _id;

        /// <summary>
        /// 自身id
        /// </summary>
        public int? Id
        {
            get { return _id; }
            set { _id = value; this.RaisePropertyChanged(() => this.Id); }
        }


        private bool _isChecked;

        /// <summary>
        /// 是否被选择
        /// </summary>
        public bool IsChecked
        {
            get { return _isChecked; }
            set { _isChecked = value; this.RaisePropertyChanged(() => this.IsChecked); }
        }

        private string _name;
        /// <summary>
        /// 菜单名
        /// </summary>
        public string Name
        {
            get { return _name; }
            set { _name = value; this.RaisePropertyChanged(() => this.Name); }
        }

        /// <summary>
        /// 子类菜单集合
        /// </summary>
        public ObservableCollection<ShopAuthorityModel> ChildMenu { get; set; }
    }
}
